<template>
  <div>
	 <play-list :playList="playList"></play-list>
  </div>
</template>

<script>

import {_Search} from "network/search.js"
import PlayList from '@/components/content/play-list/play-list'
import {sreach} from '@/mixin/components/sreach'
export default {
  name:'SearchPlaylist',
  components:{PlayList},
  mixins:[sreach],
  data(){
    return{
      searchType:1000,
	  playCount:0,
	  keywords:'',
	  playList:[],
    }
  },
  methods:{
   getList(){
   	   if (this.keywords == "") return;
   	   this.playList = [];
   	  _Search(this.keywords, this.searchType).then(res=>{
   			 this.playList = res.data.result.playlists
   	  		this.playCount=res.data.result.playlists.length;
   	  		this.$emit('setData',this.playCount,"歌单")
   	  })
   },
  }
}
</script>

<style lang="less" scoped>

</style>
